﻿using UnityEngine;
using System.Collections.Generic;
public class Vector2IntComparer : IEqualityComparer<Vector2Int>
{
    static Vector2IntComparer instance = null;
    public static Vector2IntComparer GetComperer()
    {
        if (instance == null)
            instance = new Vector2IntComparer();
        return instance;
    }
    Vector2IntComparer() { }
    public bool Equals(Vector2Int lhs, Vector2Int rhs)
    {
        return lhs.x == rhs.x && lhs.y == rhs.y;
    }
    public int GetHashCode(Vector2Int obj)
    {
        return obj.GetHashCode();
    }
}
